ScxV6Area.Move Method
Moves an Area of Interest to a new parent.
Parameters
- NewParentID
The numeric identifier of the target Area of Interest.
Remarks
The operation may fail if an existing Area of Interest with the same name already exists in the target Area of Interest.
The following example written in VB.NET moves one group into another.
Dim Svr As ScxV6DbClient.ScxV6Server
Dim Areas As ScxV6DbClient.ScxV6Areas
' Connect to the server
Svr = New ScxV6DbClient.ScxV6Server()
Svr.Connect("MAIN", "", "")
' Find the area of interest we want to move
Areas = Svr.RootArea.List
Dim AreaToMove As ScxV6DbClient.ScxV6Area
AreaToMove = Nothing
Dim TargetAreaId As Integer
For Each Area As ScxV6DbClient.ScxV6Area In Areas
If Area.Name = "Target" Then
TargetAreaId = Area.ID
ElseIf Area.Name = "Area 2" Then
AreaToMove = Area
End If
Next
If (Not AreaToMove Is Nothing) Then
AreaToMove.Move(TargetAreaId)
End If
' Disconnect
Svr.Disconnect()